<?php
namespace Partner\Model;

use Think\Model;

class ProductGoodsConfigModel extends Model {
	
	protected $_auto = array(
		array('content', 'getContent', self::MODEL_BOTH, 'callback'), 
		array('percent', 'getPersent', self::MODEL_BOTH, 'callback'),
	);
	
	// 获得分成
	public function getPersent() {
		$percent = $_REQUEST['productGoodsConfig']['percent'];
		if ( !isset($percent) ) {
			return false;
		}
		return join(':', $percent);
	}
	
	public function getContent() {
		if(!isset($_REQUEST['content'])) return false;
		$content = I("content", "", "htmlspecialchars_decode");
		return $content;
	}
}
